load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

# 加载gazelle
load("@bazel_gazelle//:def.bzl", "gazelle")

###  gazelle:prefix [注意这句注释并非没有意义，中括号替换为该项目Name]
# gazelle:prefix bazel_go_example
gazelle(
    name = "gazelle",
)

go_library(
    name = "go_default_library",
    srcs = ["main.go"],
    importpath = "bazel_go_example",
    visibility = ["//visibility:private"],
)

go_binary(
    name = "bazel_example",
    embed = [":go_default_library"],
    visibility = ["//visibility:public"],
)
